﻿@namespace MudBlazor.UnitTests.TestComponents

<MudDataGrid Items="@_items" Filterable="true">
    <Columns>
        <Column T="Model" Field="@nameof(Model.Name)" />
        <Column T="Model" Field="@nameof(Model.Age)" />
        <Column T="Model" Field="@nameof(Model.Status)" />
    </Columns>
    <ChildRowContent>
        <tr>
            <td colspan="3">@($"uid = {context.Name}|{context.Age}|{context.Status}|{Guid.NewGuid()}")</td>
        </tr>
    </ChildRowContent>
</MudDataGrid>

@code {
    private IEnumerable<Model> _items = new List<Model>()
    {
        new Model("Sam", 56, Severity.Normal), 
        new Model("Alicia", 54, Severity.Info), 
        new Model("Ira", 27, Severity.Success),
        new Model("John", 32, Severity.Warning)
    };

    public record Model (string Name, int Age, Severity Status);
}
